<template>
	<view class="main">
		<u-navbar :is-back="true" title="提现记录" :background="background" back-icon-color="#000000" title-color="#000"
			title-bold="true">
		</u-navbar>
		<view class="whole">
			<view class="draw" v-for="(item,index) in list" :key="index">
				<view class="draw_l">
					<image src="../../../static/images/ti.png" mode=""></image>
					<view class="draws">
						<view>
							提现到-{{item.bank_name}}卡
						</view>
						<text v-if="item.status==0">{{item.create_time}}</text>
						<text v-if="item.status==1||item.status==2">{{item.estimate_time}}</text>
					</view>
				</view>
				<view class="draw_r" v-if="item.status==0">
					<view>¥{{item.money}}</view>
					<text class="status">提现中</text>
				</view>
				<view class="draw_r" v-if="item.status==1">
					<view>¥{{item.money}}</view>
					<text class="status2">提现成功</text>
				</view>
				<view class="draw_r" v-if="item.status==2">
					<view>¥{{item.money}}</view>
					<text class="status3">提现失败</text>
				</view>
			</view>
		<!-- 	<view class="draw">
				<view class="draw_l">
					<image src="../../../static/images/ti.png" mode=""></image>
					<view class="draws">
						<view>
							提现到-工商银行卡
						</view>
						<text>04月01日</text>
					</view>
				</view>
				<view class="draw_r">
					<view>¥10.00</view>
					<text class="status2">提现成功</text>
				</view>
			</view>
			<view class="draw">
				<view class="draw_l">
					<image src="../../../static/images/ti.png" mode=""></image>
					<view class="draws">
						<view>
							提现到-工商银行卡
						</view>
						<text>04月01日</text>
					</view>
				</view>
				<view class="draw_r">
					<view>¥10.00</view>
					<text class="status3">提现失败</text>
				</view>
			</view> -->
		</view>

	</view>
</template>
<script>
	export default {
		data() {
			return {
				background: {
					backgroundColor: '#fff'
				},
list:[]
			}
		},
		onLoad() {


		},
		mounted() {

		},
		onShow() {
			this.getrecord()
		},
		methods: {
			getrecord(){
				global.$http.request({
					url:'/shopapi/user/WithdrawalList',
					data:{
						token:uni.getStorageSync('token')
					}
				}).then(res=>{
					if(res.data.code==200){
						this.list=res.data.data
						console.log(this.list[0].create_time.substring(5, 10));
						for (let i = 0; i < this.list.length; i++) {
							this.list[i].create_time = this.list[i].create_time.substring(5, 10)
							this.list[i].estimate_time = this.list[i].estimate_time.substring(5, 10)
						}
					}
				})
			}
		}
	}
</script>
<style lang="scss">
	page {
		font-family: PingFang SC;
		width: 750rpx;
		margin: 0 auto;
		background-color: #f7f7f7;

		.main {
			width: 750rpx;
			margin: 0 auto;

			.whole {
				margin-top: 10rpx;

				.draw {
					margin-bottom: 2rpx;
					background-color: #fff;
					padding: 23rpx 20rpx;
					;
					display: flex;
					justify-content: space-between;

					.draw_l {
						display: flex;
						align-items: center;

						image {
							width: 52rpx;
							height: 52rpx;
						}

						.draws {
							padding-left: 17rpx;

							view {
								font-size: 24rpx;
								font-weight: bold;
								color: #000000;
							}

							text {
								font-size: 22rpx;
								font-weight: bold;
								color: #808080;
							}
						}
					}

					.draw_r {
						text-align: right;

						view {
							font-size: 24rpx;
							font-weight: bold;
							color: #000000;
						}

						.status {
							font-size: 22rpx;
							font-weight: 400;
							color: #808080;
						}

						.status2 {
							font-size: 22rpx;
							font-weight: 400;
							color: #3079FF;
						}

						.status3 {
							font-size: 22rpx;
							font-weight: 400;
							color: #FF0000;
						}
					}
				}
			}
		}
	}
</style>
